﻿
@{
    ViewData["Title"] = "FormEditSave";
}

<script type="text/javascript">
    var issuccess = "1" == "@ViewData["issuccess"]";
    var msg = "@Html.Raw(ViewData["msg"])";
    var url = '@Html.Raw(ViewData["url"])';
    var isrefresparent = "1" == "@ViewData["isrefresparent"]";
    var openmodel = "@ViewData["rf_appopenmodel"]";
    alert(msg);
    if (issuccess) {
        parent.location = url;
        if (isrefresparent) {
            if ("1" == openmodel || "2" == openmodel) {//弹出层刷新
                try {
                    new RoadUI.Window().reloadOpener(null, null, "query()");
                } catch (e) {
                    new RoadUI.Window().reloadOpener();
                }
            } else if ("3" == openmodel || "4" == openmodel || "5" == openmodel) { //弹出窗口刷新
                if (parent.opener) {
                    try {
                        parent.opener.query();
                    } catch (e) {
                        parent.opener.location = parent.opener.location;
                    }
                }
            }
        }
    }
</script>